package run.siyuan.util;

import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpUtil;

/**
 * {@code @className:} MyHttpUtils
 * {@code @Description:} TODO 设置请求头
 * {@code @author:} siyuan
 * {@code @date:} 2022/12/20 18:20
 */
public class MyHttpUtil extends HttpUtil {

    /**
     * 设置前请求头
     *
     * @param url url
     * @return string
     */
    public static String reqGet(String url) {
        return HttpRequest.get(url)
                .header("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36")
                .execute().body();
    }

}
